﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI;

namespace GrayParrot.Web.Controls
{
    [Serializable]
    public class LengthChange : Feature<bool>
    {
        private string m_lenghtMenu = "[ [10, 25, 50, -1], [10, 25, 50, \"All\"] ]";

        public string LenghtMenu
        {
            get { return m_lenghtMenu; }
            set { m_lenghtMenu = value; }
        }

        public LengthChange()
        {

        }

        public override string ToString()
        {
            string retValue = string.Empty;

            retValue = string.Format("\"lengthChange\": {0}\n", this.Value.ToString().ToLower());

            if (this.Value)
            {
                retValue += string.Format(",\"lengthMenu\": {0}", this.LenghtMenu);
            }

            return retValue;
        }
    }
}
